// 车辆相关接口
import http from '../http/interface'
const Rent = {
	// 添加
	addRent: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/add',
			method: 'POST',
			data,
			// handle:true
		}, ifLoad)
	},
	// 获取
	getRent: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/list',
			method: 'GET',
			data
			// handle:true
		}, ifLoad)
	},
	// 改
	editRent: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/edit',
			method: 'PUT',
			data
			// handle:true
		}, ifLoad)
	},
	// 删除车辆
	delRent: id => {
		return http.request({
			url: '/rc/rent-info/deleteById?id='+id,
			method: 'DELETE',
			// handle:true
		})
	},
	// 获取
	getRentList: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/rentList',
			method: 'GET',
			data
			// handle:true
		}, ifLoad)
	},
	// 通过审核
	acceptRent: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/accept',
			method: 'GET',
			data
			// handle:true
		}, ifLoad)
	},
	// 拒绝审核
	rejectRent: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/reject',
			method: 'GET',
			data
			// handle:true
		}, ifLoad)
	},
	// 预约车辆
	orderRent: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/order',
			method: 'GET',
			data
			// handle:true
		}, ifLoad)
	},
	// 预约车辆
	cancelRent: (data, ifLoad = false) => {
		return http.request({
			url: '/rc/rent-info/cancel',
			method: 'GET',
			data
			// handle:true
		}, ifLoad)
	},
}
export default Rent
